package com.entity;

import java.io.Serializable;

/**
 * @author 
 */
public class Buyer implements Serializable {
    private Integer bid;

    private Integer mid;

    private String bname;

    private String bsex;

    private String bip;

    private Integer bpwd;

    private String bimage;

    private static final long serialVersionUID = 1L;

    public Integer getBid() {
        return bid;
    }

    public void setBid(Integer bid) {
        this.bid = bid;
    }

    public Integer getMid() {
        return mid;
    }

    public void setMid(Integer mid) {
        this.mid = mid;
    }

    public String getBname() {
        return bname;
    }

    public void setBname(String bname) {
        this.bname = bname;
    }

    public String getBsex() {
        return bsex;
    }

    public void setBsex(String bsex) {
        this.bsex = bsex;
    }

    public String getBip() {
        return bip;
    }

    public void setBip(String bip) {
        this.bip = bip;
    }

    public Integer getBpwd() {
        return bpwd;
    }

    public void setBpwd(Integer bpwd) {
        this.bpwd = bpwd;
    }

    public String getBimage() {
        return bimage;
    }

    public void setBimage(String bimage) {
        this.bimage = bimage;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Buyer other = (Buyer) that;
        return (this.getBid() == null ? other.getBid() == null : this.getBid().equals(other.getBid()))
            && (this.getMid() == null ? other.getMid() == null : this.getMid().equals(other.getMid()))
            && (this.getBname() == null ? other.getBname() == null : this.getBname().equals(other.getBname()))
            && (this.getBsex() == null ? other.getBsex() == null : this.getBsex().equals(other.getBsex()))
            && (this.getBip() == null ? other.getBip() == null : this.getBip().equals(other.getBip()))
            && (this.getBpwd() == null ? other.getBpwd() == null : this.getBpwd().equals(other.getBpwd()))
            && (this.getBimage() == null ? other.getBimage() == null : this.getBimage().equals(other.getBimage()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBid() == null) ? 0 : getBid().hashCode());
        result = prime * result + ((getMid() == null) ? 0 : getMid().hashCode());
        result = prime * result + ((getBname() == null) ? 0 : getBname().hashCode());
        result = prime * result + ((getBsex() == null) ? 0 : getBsex().hashCode());
        result = prime * result + ((getBip() == null) ? 0 : getBip().hashCode());
        result = prime * result + ((getBpwd() == null) ? 0 : getBpwd().hashCode());
        result = prime * result + ((getBimage() == null) ? 0 : getBimage().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", bid=").append(bid);
        sb.append(", mid=").append(mid);
        sb.append(", bname=").append(bname);
        sb.append(", bsex=").append(bsex);
        sb.append(", bip=").append(bip);
        sb.append(", bpwd=").append(bpwd);
        sb.append(", bimage=").append(bimage);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}